
//

#import "BaseViewModel.h"


@interface BaseViewModel ()

@property (nonatomic, assign) NSInteger currentPage;//当前页数 - 

@end

@implementation BaseViewModel

- (instancetype)init{
    self = [super init];
    if (self) {
        
        _currentRefresh = RefreshTypeRenew;//初始刷新
        _currentPage = 0;//初始第一页
    }
    return self;
}

- (NSMutableArray *)dataArray{
    if (!_dataArray) {
        
        _dataArray = [NSMutableArray array];
        
    }
    return _dataArray;
}

- (void)setCurrentRefresh:(BaseRefreshType)currentRefresh{
    _currentRefresh = currentRefresh;
    if (_currentRefresh) {//追加
        _currentPage ++;
        
    } else {//重置
        _currentPage = 0;
    }
}


/**
 布局数据
 
 @param layoutData 成功||失败
 */
- (void)layoutRequestBackData:(LayoutData)layoutData;{
    
}

@end
